{% load i18n %}

{% spaceless %}

{% if is_paginated %}
	<div class="paginator">
	
		{% if has_previous %}
			<span class="prev">
			<a href="{{base_url}}/page/{{ previous }}/" title='{% trans "Previous Page" %}'>
			<!-- {% trans "Previous" %} --> &laquo;
			</a></span>
		{% else %}
			<span class="prev-na">
				<!-- {% trans "Previous" %} -->
				&laquo;
			</span>
		{% endif %}
		
		 
		{% if not in_leading_range %}
			{% for num in pages_outside_trailing_range %}
				<span class="page"><a href="{{base_url}}/page/{{ num }}/" >{{ num }}</a></span>
			{% endfor %}
			<span class="trail">...</span>
		{% endif %}

		{% for num in page_numbers %}
			{% if num == page %}
				<span class="curr" title="{% trans 'Current Page' %}">{{ num }}</span>
			{% else %}
				<span class="page"><a href="{{base_url}}/page/{{ num }}/" title='{% trans "Page" %} {{ num }}'>{{ num }}</a></span>
			{% endif %}
		{% endfor %}
		
		
		{% if not in_trailing_range %}
			<span class="trail">...</span>
			{% for num in pages_outside_leading_range reversed %}
				<span class="page"><a href="{{base_url}}/page/{{ num }}/" >{{ num }}</a></span>
			{% endfor %}
			
		{% endif %}
		
		
		{% if has_next %}
			<span class="next">
			<a href="{{base_url}}/page/{{ next }}/" title="{% trans 'Next Page' %}">
			<!--  {% trans "Next" %} --> &raquo;
			</a></span>
		{% else %}
			<span class="next-na">
				<!-- {% trans "Next" %} -->
				&raquo;
			</span>
		{% endif %}
		
	</div> 
{% endif %}
 
{% endspaceless %}
